<?php
namespace Home\Controller;
use Think\Controller;
class CustController extends ZMController {
    public function region(){//区域
		$Model=M();
		$res=$Model->query("select n,value from ddwk_customer_c1 where mid=5");
		$this->ajaxReturn($res);
	}
	public function hospital(){//监测医院
		$Model=M();
		$res=$Model->db(1,'DB_CONFIG1')->query("select hid,name from ddwk_hospital where hid<>11");
		if(ACTION_NAME=='hospital'){
		    $this->ajaxReturn($res);
		}
		else{
			return $res;
		}
	}
	public function customer(){//卫生机构
		$Model=M();
		$res=$Model->query("select a.id,a.name from ddwk_customer as a where a.isdel<>1 and a.status<>4 and a.d1=1");
		$this->ajaxReturn($res);
	}
}